#!/bin/sh

cd `dirname "$0"`

if [ -z "$1" ] 
then 
	outputdir=~/Desktop
else
	outputdir="$1"
fi

if [ -z "$2" ] 
then 
	outputdir1=~/Рабочий\ стол
else
	outputdir1="$2"
fi

if [ -z "$3" ] 
then 
	outputdir2=~/.local/share/applications
else
	outputdir2="$3"
fi



echo "[Desktop Entry]
Name=Settlers 2: Зарождение цивилизаций
Exec=$PWD/sadk
Type=Application
StartupNotify=true
Path=$PWD/wine_prefix/dosdevices/d:/game
Categories=Game
Icon=$PWD/share/sadk.png"  > "$outputdir/sadk.desktop"

echo "[Desktop Entry]
Name=Settlers 2: Зарождение цивилизаций
Exec=$PWD/sadk
Type=Application
StartupNotify=true
Path=$PWD/wine_prefix/dosdevices/d:/game
Categories=Game
Icon=$PWD/share/sadk.png"  > "$outputdir1/sadk.desktop"

echo "[Desktop Entry]
Name=Settlers 2: Зарождение цивилизаций
Exec=$PWD/sadk
Type=Application
StartupNotify=true
Path=$PWD/wine_prefix/dosdevices/d:/game
Categories=Game
Icon=$PWD/share/sadk.png"  > "$outputdir2/sadk.desktop"

chmod +x "$outputdir/sadk.desktop"
chmod +x "$outputdir1/sadk.desktop"
